<?php
require_once('core/pglob.php');
require_once('module/base/class_login.php');

class pa_wmslogin {
	public function execute(){
		global $G_PGLOB;
		if (isset($_REQUEST["operFlg"])){
			$operFlg= $_REQUEST["operFlg"];
			switch ($operFlg){
				case 2: // 登陆
					$login = new login_module();
					$result_code = $login->do_login(2);
					if ($result_code === 0) //登陆成功
						$G_PGLOB->smarty->display('comm/main.tpl');
					else{
						$_REQUEST["err_msg"] = $result_code;
						include('wms_login.php');
					}
					break;
			}
		}		
	}
}
?>